package com.dc.chat.app.service.mp;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dc.chat.entity.dao.Friend;
import com.dc.chat.entity.dao.Picture;
import com.dc.chat.entity.dao.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

@Service
public class PictureService extends ServiceImpl<PictureService.PictureMapper,Picture> {

    public IPage<Picture> pages(long current,long size) {
        IPage<Picture> page = new Page(current,size);
        LambdaQueryWrapper<Picture> wrapper = Wrappers.lambdaQuery(new Picture());
        return baseMapper.selectPage(page,wrapper);
    }

    public interface PictureMapper extends BaseMapper<Picture>{

    }
}
